package com.xxl.job.core.commons.annotation;


import com.xxl.job.core.commons.annotation.impl.MustEmptyImpl;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * description : 为空校验
 *
 * @author : tanxingsong
 * @date : 15:20 2019/2/26
 * @email : tanxingsong@cetcbigdata.com
 */
@Constraint(validatedBy = MustEmptyImpl.class)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
public @interface MustEmpty {

    String message() default "校验不通过，校验字段不为空";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
